import util from '@/lib/util';

const KEY_MENU_SWITCH_FANGBO = "KEY_MENU_SWITCH_FANGBO";
const KEY_MENU_SWITCH_SHUANGBO = "KEY_MENU_SWITCH_SHUANGBO";
const KEY_MENU_SWITCH_WIZARD = "KEY_MENU_SWITCH_WIZARD";

export default class MenuSwitch{

    /**方波大剂量菜单是显示 */
    isMenuFangboOn = util.cookies.get(KEY_MENU_SWITCH_FANGBO) === "true"

    /**双波大剂量菜单是否显示 */
    isMenuShuangboOn =  util.cookies.get(KEY_MENU_SWITCH_SHUANGBO) === "true"

    /**向导大剂量菜单是否开 */
    isMenuWizardOn = util.cookies.get(KEY_MENU_SWITCH_WIZARD) === "true"

    /**开启方波菜单 */
    switchMenuFangboOn(){
        this.isMenuFangboOn=true;
        util.cookies.set(KEY_MENU_SWITCH_FANGBO,true);
    }

    /**关闭方波菜单 */
    switchMenuFangboOff(){
        this.isMenuFangboOn=false;
        util.cookies.set(KEY_MENU_SWITCH_FANGBO,false);
    }

    /**开启双波菜单 */
    switchMenuShuangboOn(){
        this.isMenuShuangboOnis=true;
        util.cookies.set(KEY_MENU_SWITCH_SHUANGBO,true);
    }

    /**关闭双波菜单 */
    switchMenuShuangboOff(){
        this.isMenuShuangboOn=false;
        util.cookies.set(KEY_MENU_SWITCH_SHUANGBO,false);
    }

    /**开启向导大剂量 */
    switchWizardMenuOn(){
        this.isMenuWizardOn=true;
        util.cookies.set(KEY_MENU_SWITCH_WIZARD,true);
    }

    /**关闭向导大剂量 */
    switchMenuWizardOff(){
        this.isMenuWizardOn=false;
        util.cookies.set(KEY_MENU_SWITCH_WIZARD,false);
    }
}